//
//  LanguageChangeCell.m
//  CBT
//
//  Created by Mr.Zhang on 2018/11/19.
//  Copyright © 2018 Mr.Zhang. All rights reserved.
//

#import "LanguageChangeCell.h"

@interface LanguageChangeCell()

@property (nonatomic, strong) UIView *lineView;

@end

@implementation LanguageChangeCell

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.backgroundColor = [UIColor whiteColor];
        [self initSubViews];
    }
    return self;
}

- (void)initSubViews
{
    _selectLabel = [[UILabel alloc]initWithFrame:CGRectMake(15, 0, ScreenNarrowSide, 50)];
    _selectLabel.font = [UIFont systemFontOfSize:16];
    _selectLabel.textColor = UIColorFromRGB(0x7889ff);
    [self.contentView addSubview:_selectLabel];
    
    [self.selectLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.bottom.mas_equalTo(0);
        make.right.mas_equalTo(0);
    }];
    
    _lineView = [[UIView alloc]init];
    _lineView.backgroundColor = UIColorFromRGB(0xE6E9F7);
    [self.contentView addSubview:_lineView];
    
    [_lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_offset(15);
        make.right.mas_offset(-15);
        make.bottom.offset(0);
        make.height.mas_offset(0.5);
    }];
}

- (UILabel *)selectLabel
{
    if (!_selectLabel) {
        _selectLabel = [[UILabel alloc]initWithFrame:CGRectMake(15, 0, ScreenNarrowSide, 50)];
        _selectLabel.font = [UIFont systemFontOfSize:16];
        _selectLabel.textColor = UIColorFromRGB(0x7889ff);
    }
    return _selectLabel;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
